Package-level declarations

Properties

Link copied to clipboard
const val MOD_ID: String

The identifier of Staff Mod.

Inherited properties

Link copied to clipboard

Gets the approximate position of the item in the staff, when held my an entity.

Link copied to clipboard

Gets the approximate position of the staff's tip, when held by an entity.

Link copied to clipboard

Checks if the user has sufficient space in front to use the staff.

Link copied to clipboard
@get:JvmName(name = "hasStaffHandler")
val Item.hasStaffHandler: Boolean

Returns if the given item has a registered handler when inserted into a staff.

Link copied to clipboard

Checks if the player's attack is on cooldown.

Link copied to clipboard
@get:JvmName(name = "isItemInStaff")
val ItemStack.isItemInStaff: Boolean

Checks if an item is added the given staff item stack.

Link copied to clipboard

Checks if the given item stack is a staff.

Link copied to clipboard

Gets the item inserted into the given staff item stack.

Link copied to clipboard

Gets the item stack inserted into the given staff item stack. The value returned MUST NOT be modified in any way, use mutableItemStackInStaff instead.

Link copied to clipboard

Gets or sets a copy of the item stack inserted into the given staff item stack. The value returned or passed in can be freely modified.

Link copied to clipboard

Returns the registered staff handler of the given item if available.

Link copied to clipboard

Returns the registered staff handler of the given item if available, StaffHandler.Default otherwise.

Functions

Link copied to clipboard

Creates an EntityAttributeModifier, which changes the attack damage to totalAttackDamage after subtracting the player's base attack damage.

Link copied to clipboard

Creates an EntityAttributeModifier, which changes the attack speed to totalAttackSpeed after subtracting the player's base attack speed.

Link copied to clipboard

Creates an EntityAttributeModifier, which changes the attack speed to the reciprocal of totalEquipTime after subtracting the player's base attack speed.

Link copied to clipboard

Creates an EntityAttributeModifier, which increases the interaction range by additionalRange.

Inherited functions

Link copied to clipboard
inline operator fun Vec3d.component1(): Double
inline operator fun Vec3i.component1(): Int
inline operator fun Vector3f.component1(): Float
Link copied to clipboard
inline operator fun Vec3d.component2(): Double
inline operator fun Vec3i.component2(): Int
inline operator fun Vector3f.component2(): Float
Link copied to clipboard
inline operator fun Vec3d.component3(): Double
inline operator fun Vec3i.component3(): Int
inline operator fun Vector3f.component3(): Float
Link copied to clipboard
fun World.damageSource(damageKey: RegistryKey<DamageType>, source: Entity, attacker: Entity): DamageSource

Utility function to create a DamageSource.

Link copied to clipboard
fun EntityType<out Entity>.getSpawnPosition(world: World, center: Vec3d): Vec3d?

Gets the spawn position if the given entity has enough space to spawn at the given position, or null, if the position is obstructed by blocks.

Link copied to clipboard

Checks if the given item is on cooldown and cannot be used.

Link copied to clipboard
inline operator fun Vec3d.minus(other: Vec3d): Vec3d
Link copied to clipboard
inline operator fun Vector3f.minusAssign(other: Vector3fc)
Link copied to clipboard
inline operator fun Vec3d.plus(other: Vec3d): Vec3d
Link copied to clipboard
inline operator fun Vector3f.plusAssign(other: Vector3fc)
Link copied to clipboard
inline fun MatrixStack.push(action: MatrixStack.() -> Unit)

Pushes to the given matrix stack, invokes action, then pops from the given matrix stack.

Link copied to clipboard
inline operator fun Vec3d.times(scalar: Double): Vec3d
Link copied to clipboard
inline operator fun Vector3f.timesAssign(scalar: Float)
Link copied to clipboard
inline operator fun Vec3d.unaryMinus(): Vec3d